home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / gsar110.zip / GSAR.H < prev    next >
C/C++ Source or Header  |  1996-08-08  |  2KB  |  64 lines

  1. /* gsar.h ***************************************** UPDATED: 960801.13:49 TT
  2.  *
  3.  * Description : Header file for gsar
  4.  * Author      : Tormod Tjaberg
  5.  *
  6.  * Changes:
  7.  *
  8.  * Currently compiles under :
  9.  * Turbo C 2.0, Turbo C++ 1.0, Turbo C++ 3.0, Zortech C++ 3.0,
  10.  * Watcom C 386 8.0, Ultrix ANSI C, Microsoft 6.0, GCC
  11.  */
  12.  
  13.  
  14. /* System type defined upon the following
  15.  * __TURBOC__ : All Borland C/C++ versions
  16.  * __ZTC__    : Zortech/Symantec
  17.  * __DJGPP__  : DJ Delorie's GNU port to the PC
  18.  * __WATCOMC__: Watcom C/C++
  19.  * MSDOS      : Set by various DOS compilers... ( Watcom 386, Microsoft )
  20.  */
  21.  
  22. #if defined(__TURBOC__) || defined(__ZTC__) || defined(MSDOS) || defined(__DJGPP__) || defined (__WATCOMC__)
  23. #ifndef MSDOS
  24. #define MSDOS     5
  25. #endif
  26. #else
  27. #ifndef __UNIX__
  28. #define __UNIX__  3
  29. #endif
  30. #endif
  31.  
  32. #ifndef BUFSIZ                            /* ANSI C predefined constant */
  33. #ifdef  MSDOS
  34. #define BUFSIZ 1024                       /* size of search buffer */
  35. #else             /* its __UNIX__ */
  36. #define BUFSIZ 4048                       /* size of search buffer */
  37. #endif
  38. #endif
  39.  
  40. #define TXT_CONTEXT 80      /* length of textual context     */
  41. #define HEX_CONTEXT 64      /* amount of hex bytes displayed */
  42. #define PAT_BUFSIZ  128     /* buffer limit < unsigned short */
  43.  
  44. typedef struct
  45. {
  46.    signed char fVerbose;    /* true if we are to be verbose */
  47.    signed char fByteOffset; /* display byte offset in file */
  48.    signed char fTextual;    /* display context textual */
  49.    signed char fFileSpec;   /* display filespec */
  50.    signed char fHex;        /* display contents in hex */
  51.    char *pInputFile;        /* current input file name */
  52.    FILE *fpIn;              /* input stream */
  53.    FILE *fpOut;             /* output stream */
  54.    FILE *fpMsg;             /* message stream */
  55.    unsigned short Context;  /* length of context to display */
  56. } OUTPUT_CTRL;
  57.  
  58. /* function prototypes
  59.  */
  60. void BMG_Setup(char *, int, char);
  61. long BMG_Search(OUTPUT_CTRL * );
  62. long BMG_SearchReplace(OUTPUT_CTRL *, char *, unsigned short);
  63.  
  64.